'use strict';

angular.module('myApp.teach_new', [])

.controller('teach_newCtrl', ['$scope','$http',
    function($scope,$http) {

    $http.get('v1/teach_content_cat').success(function(data){
        $scope.model = data.result;
          console.log($scope.model);
    });

	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			resizeType : 1,
			allowPreviewEmoticons : false,
			allowImageUpload : false,
			items : [
				'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link']
		});
	});	
}]);